#include "color.h"
#include "_color.h"
#include "_mediator.h"
#include <ostream>

using std::ostream;

ostream& operator<<(ostream& strm, const Color& c) {
  return strm << c.p->get_color_pair(strm);
}

Color::Color() : Color(White) {
}

Color::Color(const int& c) : p(new P) {
  p->colorval_ = c;
}

Color::Color(const int& fg, const int& bg) {
  set(fg, bg);
}

Color& Color::set(const int& fg, const int& bg) {
  p->colorval_ = fg + (8 * bg);
  return *this;
}
